<script setup lang="ts">
defineProps({
  btns: {
    // @ts-expect-error PropType 不识别
    type: Array as PropType<{ label: string; value: string }[]>,
    default: () => []
  },
  title: {
    type: String,
    default: ''
  },
  tip: {
    type: String,
    default: ''
  }
})
</script>

<template>
  <div>
    <el-card style="margin-bottom: 12px" shadow="never">
      <template #header>
        <div class="text-title">
          <span>{{ title }}</span>
          <el-tag type="danger">{{ tip }}</el-tag>
        </div>
      </template>
      <div>
        <el-row :gutter="20">
          <el-col :span="6" v-for="(item, index) in btns" :key="index">
            <div class="main">
              <div>{{ item.value }}</div>
              <div style="margin-top: 10px; color: #6b7280; font-size: 14px">
                {{ item.label }}
              </div>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-card>
  </div>
</template>

<style lang="scss" scoped>
.text-title {
  color: #6b7280;
  display: flex;
  justify-content: space-between;
}
.main {
  font-size: 18px;
  width: 100%;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #f6f6f6;
}
</style>
